// TODO 导入 service
import service from '../utils/request'

// TODO 定义对象
export interface IMonitor {
  SYSTEM: string // 系统名称
  TABLESPACE_NAME: string // 表空间
  MAXBYTES: number // 可用容量
  USEDBYTES: number // 已用容量
  FREEBYTES: number // 剩余容量
  TSUSEDPCT: number // 已用百分比
}

// @Tags Monitor
// @Summary 分页获取Monitor列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取Monitor列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /Monitor/getMonitorList [get]
export const getMonitorList = () => {
  return service({
    url: '/v1/monitor',
    method: 'get',
    // http://127.0.0.1:4523/mock/697928/Monitor/getMonitorListPage?pageInfo={"page":1,"pageSize":10}&MonitorInfo={}
    // Qs后: http://127.0.0.1:4523/mock/697928/Monitor/getMonitorListPage?pageInfo[page]=1&pageInfo[pageSize]=10
    // paramsSerializer: (params) => {
    //     return Qs.stringify(params, { arrayFormat: "indices" })
    // }
  })
}
export const getThreshold = () => {
  return service({
    url: '/v1/threshold',
    method: 'get',
  })
}
